/*Author:no-bald-chen
 * Time:2021/8/26
 * */
package Algorithm.sort;

public class Insert_sort {
    public void sort(int[] nums){
        for (int i = 1; i < nums.length; i++) {
            int temp = nums[i];
            int j = i;
            while (j>0 && temp<nums[j-1] ){
                nums[j] = nums[j-1];
                j--;
            }
            nums[j] = temp;
        }
    }
}
